<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>E-Drift: Creating model file</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doc/style.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">E-Drift
   &#160;<span id="projectnumber">0.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Creating model file </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>To work with a difussion system, the program requires a so called model file. The file is a plain text file which consist of the description and design of the system written in a series of identifier. Lines begining with a hask '#' is ignored. Followings are a list of identifier:</p>
<p><b>name</b> name_of_model <br/>
 Defines the name of the model</p>
<p><b>dim</b> nx ny [nz] <br/>
 Defines the number of cell in x,y, and z direction. If only nx and nz is given the simulation model is 2 dimensional.</p>
<p><b>timestep</b> timestep <br/>
 Defines the timestep of the finite-difference calculation</p>
<p><b>spacestep</b> h <br/>
 Defines the size of finite-different cell (same size in all dimension)</p>
<p><b>set</b><br/>
 Defines a variable and set a constant value or an arithmetic expression.<br/>
 Example: </p>
<div class="fragment"><pre class="fragment">
set lam=140
set DL*DL*DL
</pre></div><p><b>periodic x|y|z</b><br/>
 Set peridic axis.</p>
<p><br/>
<br/>
 E-Drift use a map in 2-D or 3D, to design the model. The map consists of symbols which will be converted to the type of cell in the finite-difference calculation grid.</p>
<p><b>symbol</b> <br/>
 Declares the symbol table of finite-difference cells. This command must be followed by newline separated list of simbol-boundary pair identifiers. First field is the symbol and the second is the boundary type. The list is terminated by empty line. Example:</p>
<div class="fragment"><pre class="fragment">
symbol
a p+++p+
b ++++p+
c +p++p+
d p+++++
e ++++++
f +p++++
g p++++p
h +++++p
i +p+++p

</pre></div><p>The first files is the symbol of the cell represented by a single character. The second field is the list of the status neighbouring cell (boundary), arranged in left-right-top-bottom-near-far sequence. Plus '+' means that the heighbor exists, minus '-' for empty, and 'p' for periodic.</p>
<p><b>map</b><br/>
 Defined the map (design) of the simulation cell. The map is sequence of symbols listed in the <b>symbol</b> declaration. One character per cell and terminated by an empty line. The number of character must be synchronized with the dimension of system. Basically a map consists only of a stream of nx*ny*nz characters, arranged in row-major. The subsequent character is the cell with increasing x coordinate. In the front end, one can define the duplication of a set of characters by giving a number of replication after the character list (second field). To make duplication of a group of characters curly bracket can be used. Followings are some examples:</p>
<div class="fragment"><pre class="fragment">
map
.................................................. 1
abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbc
dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxe 21
dxxxxxxxxxxxxxxxxxxxxxxxssxxxxxxxxxxxxxxxxxxxxxxxe 4
dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxe 21
fggggggggggggggggggggggggggggggggggggggggggggggggh
.................................................. 1

</pre></div><p>Group duplication </p>
<div class="fragment"><pre class="fragment">
map
.... 16
abbc 32
.... 16 
{ 2
.... 16
deef 32
.... 16
}
.... 16
ghhi 32
.... 16

</pre></div><p><b>cell</b> <br/>
 The initialization of the cell. The value of cells follows in the newline after the identifier. The first field of the value is a list of symbols that what to be assigned by the value in the second field. A symbol is previously defined by the <b>symbol</b> command, with some special characters,</p>
<ul>
<li>* applies to all cell </li>
<li>@ applies to a region defined in the second field.</li>
</ul>
<p>Syntax:<br/>
</p>
<p>symbols expression:start_time[:stop_time]</p>
<p>The second field is the value that will be assigned to the cells. A constant number or a basik mathematical equation may be used here. Special when "@" is used as symbol, the expression is started by the range of coordinate of the cell. Arithmetic expression is writen between curly brackets<br/>
 Example:<br/>
</p>
<div class="fragment"><pre class="fragment">
a 0.23:0
bcd {C*exp(-z/lam)}:0:10000
@ 0,15,0,49,20,0={5*sin((x/(LX-DL))*Pi)^2:0:100}
</pre></div><p><b>source</b><br/>
 Sets the source matrix. Using time limits this can be a pulse of source. The syntax is the same as <b>cell</b>.</p>
<p><b>conductivity</b><br/>
 Sets the conductivity matrix. The syntax is the same as <b>cell</b>.</p>
<p><b>capacity</b><br/>
 Sets the heat capacity matrix. The syntax is the same as <b>cell</b>.</p>
<p><br/>
 <b>Model file example</b><br/>
</p>
<div class="fragment"><pre class="fragment">
name cuslab
dim 4 4 1000
timestep 2e-5

spacestep 7.23
periodic xy

# x: fd zone
# m: md zone

symbol
x ++++++
m ++++++

map
{ 1000
mmmm
mmmm
mmmm
mmmm
}

# in lammps::fix_edrift two first tables are reserved for Ce(Te) and G(Te)
table Ce_Cu.dat 1e+4 6.2414e-7
table G_Cu.dat 1e+4 6.2414e-7

set lam=140
set ohm=DL*DL*DL

set phi=100

# in kelvin timestep/Tau
set C=phi/(lam*DT*10000)

cell
* 320.0:0

# 200 fs pulse
source
* {C*exp(-z/lam)}:0:10000

conductivity
* 0.2497:0

capacity
* {Read(1,cell)}

</pre></div> </div></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Jul 19 2012 12:00:34 for E-Drift by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
